updating my homeworks from 180 lines of code...