reduced js code