made his code work