changed else to elif, working now