reworking equality and contains checks