work on ui-libification
fix locking