changed primitive long variables to object Long variables