adding events and javascript docs