some optimisations of conditions