make hook for internal commands.