fixing nesting and adding options for row manipulation