put functions into object
use this
code refactor
solve conflicts