used a non-clean solution to handle encoding issues