Minor changes
use long instead of float