method naming and remove unnecessary else block