mem - checkpoint]
mem - first working compile - not all tests done