added some optimisation suggestions