refactor location change to accomodate for endless scrolling