Added put method to lib and register function