some optimisations