Func snippet optimized