finish signature function