Fuction Action2 was added to the existing code.