add def function & completion