Nicer code to replace 4 files!!!