solo solved - needs refactoring