add sorting with meta data

fixes #132