updated trycatch to work with new match, new catch...then syntax