code cleanup, code simplification