squashed previous commits and added only set-enpoint function
removed merge conflicts