adds weights vector