tidier code in preference to @CompileStatic