finished refactoring signing unit test passes again