3 sum reimpl