just work, need refactor