some fixex and improvemants