API to set mode