remove unnecessary nesting