modified tutorial to represent the right API used in stage5