First working version of Q012-Q013, to be finished