some more code simplification