added error_reporting(0) to prevent php from printing warnings and notices