ALL UPDATED SOURCE CODE