fix all of compile errors and begin to test