conver floats to ints
use caching