Completed configuration code
Added new mode