points wrap properly
fixing algorithms