added many sync methods, tested reentrant