optimise loops for performance
LINT
LINT
fix jsgi attribute
LINT
minor optimisation
specialisation