few more minor optimisations