fixing the try function