modification to work for boolean objects