Code now ports data into mongo but there is an issue with encoding