silly optimisations (probably not really effecive either)