rewritten and slimmed ConventLib