Changed structure to stick to paper formalism