add notes on JS functions