Updated with correct solutions