fixing errors, should compile now