Added elsif statements