added params so L1 norms and projections work with number of inputs