implemented pasing of data and pos. Need to test it