using promises for the package listeners
edit in codepen
promises for snippets