changed try catches