compiles but not right; time to debug