working sortable table finallygs
code refactored :lips: