assign register in constructor