added functionality for past locations