start some func and fix errors