added else if statement