Made the code based on the example doc