sort vector space (not finished yet)