populateCache fist commit
Updated keygen function