rearranged things and fixed upper coma encoding problem