some more optimisations