break non-main compatibilty and optimize