Debug info and changed int to long for more accuracy