code separation into modules
stable version