refactored to put source in folders and add dependencies