added a solution to the plus one problem