Modified for personal use and public key