add collection js and fix template