got rid of pointless nesting