changed else to elif and it all works now