fixed compile errors, compiled