updated with JS examples