use div instread of int cast