added compiler optimisations