replaced register(arr) method with register(str, str)