Updated with new helper code