changes hardcoded size of integer to sizeof(int)