improve treatment, fix bugs