Simplified sample and removed auto to void ambiguous call errors.