add for edge cases: empty, [(0,0)]
correct bugs for zero point