some high performance optimisation