reuse cont as function's parameter

reuse cont as function's parameter, simplify many things.