added option to registrate
added working registration