move random integer operations to a separate header