use async refactoring post.js functions