Add mapper function for sorting by proxy