add some js logic