fix erro of access to out of memory regsion
adjust space
add base64encode and base64decode functions