moved all code examples into testable separate files