changing code back to something similar to what was previously