Added 'j' optimisation