added helper js for when it's embedded