refactoring of SignatureParser