Adjusted pointer dereferencing, removed dividing velocity by density=0