Changed to instance type. Adding register function