add proper toggles, refine JS