create initial dictionary before starting
encoding implemented (not tested)