changes made for encoding problem