adding base64_decode function that will be needed for SAM as mentioned in #85