coordinate descent initial code