checksig working. needs tidying up