fixed some compile errors, but there's still more