Added boolean to function.