upsample returns int