added else if statment