add resister directive