hw6 initial implementation