static rework and some fixes