Changed magic boolean to a named variable