Added the solution to the rest of func