added catch to promises