Refactored, explicitly covert id to int