minor fix in method signature for contains and state check