Revamped code