reworked elsif in division method