First working version of signature generator