removed useless type alias, added charset parameter