optimize check signature