fixing code for cross check