errorhandling to q added