most of function is complete, some style should be change to more friendly