Got rid of unnecessary nesting