reading, casting, encryption added