functioning  L1 relaxation algo