Using `temp` there is already that function, however it just seems a tad clunky to fit in what we are doing. Find out a way of doing it.