updated database call to include indexing of users.