fixed non-compiling code