algorithm changed. vector compared.