refactored methods
solved merge conflict