Modify check in logic