refactored “reg” (renamed to ‘register’), removed duplicated code
address as method