added else if statements