Assignment for converting bad code to good code