debugged almost everything, left sort and filter