fixed synchronous code
fix function's names