size optimisations for several routines