basic have/need sorting functionality added