have basic sorting working