refactored a bit more on 6, added group solutions on 3