Faffing with signatures, based off psudocode in docs.