clean up unnecessary nesting