added min character func. (commented out)