updated for ARC and modern run time