more minor optimisations