reimplement the sort button fixes #45