change use function, can add the handler function on spec "index". and can auto run the handler.