added more detailed js documentation