tests and refactoring for sll