fixed a bug, separated the files