cleanup method if else return expression