move signature verification to seperate method to be able to test it