added custom Base64 implementation