optimize and fixed base script + reduce kernel size!