removed unnecessary nesting