May be change this to float instead of int since int may not be always enough