added some better point handling