better error handling
rudamentory support for signing