done with first iteration: almost feature complete wrt to paper