add first and last pos