added conditional operation