initialization. finished code and compiled successfully. some bugs exits