changed to else-if