bugfix; work on formalism