added change last point function