Feature/implement register func

Solve #1