move async design to sync
refactor monitor code