added basic JS functions