remove unnecessary code; simplify