added boolean check