set some js functionality