simplify js function
reflect new repo