switching code to my code