added bool and if