finish the logic, next is config