Changed return type of function register