New stat finished

some functions need additional locking