refactor the implement of automatics