change (boolean) to (bool) in casting for consistency