Switch activities code

DO NOT CHANGE