new base64 decoding function implemented