initial code in js