solved register problem