fixed mistakes - now compiles