Added handling for boolean values, added set_output function