improved collection js support