Made code neater by condensing

changed else: if: to elif: