replace main source. Updating code