hw6 initial implementation for ex1