add build system and some fix