integrating with isActiveCol
CFD- Factoring out javascript into separate file

refactored to chain more efficiently