Merged Code - V1