Adoping boolen for enabled in code instead of int