Updated with solution

first attempt