added function register