add dump selected lines func