adding boolean check