updated point drawing code