using x vector for x final position on matrix