fix utf8 encoding
add strict typing