Now creates if-statement with if and else block
refactoring to methods