changed filenames and code structure