base64 implemtation complete