move exception catching in