remove log and unnecessary code