beta version ready for code generation
all in separate files