im really confused about handicaps

i joined a club at the same time as a work colleague joined his, we got our cards in and his starting handicap was 22 mine was 23.
he invited me to play at his course a couple of weeks back and i beat him by 17 strokes!
so surely one of our handicaps is wrong?