new helper function, toboolean