working version of ADMM. but code needs refactoring