added a begin and rescue