Refactored 2 methods
fixes #3