added function for extracting user ids and coordinates