adjusted bug from float to int