working better
some fixes