code for the challenges