added certificates check