fix bug
delete unused variables