Added attribution to David for functions