Updated Code to original setup