using ordered-dict, filter is now kinda broken, but sort works