origianl code for exercise