Fixed code to meet standards after looking thru instructor code