simplify completion code