Solves 6, needs refactoring