rearrange the files and rewrite the functions about print result