changed vector data from array to ptr
seems to work
new ptr version tested