added else if statemtn