Added logic for returned binary state