3sum, code is ugly, but working...