fix signature of register function