register working using lib