done hw5. rewrote initial file with homework