how to define private functions in javascript?