moved trycatches for speed