add comments and set namespace
modify almost finished