Updated example after some good comments