add and bind smart-open-line function