Corrected all code