adding error block