added correct checking