final draft of code minus comments