compiles but output not correct yet