adiing my final solution to 02