added conditional logic, length and =