handle encoding and start to work on report