Free for all code. Modified signature of attactvector slightly