modified files to work correctly