add some codes in js