[refactor] rewrote common module