Coded in 2 hours, will improve