refactored agent location to position