Reduced code, keep only required code