casting id to int for comparison