Added new features like setOperationMode function