adding test and fixing nesting