removed uneeded check_plain function