First draft of linear solution done.