Updating the populate query