write demo with context class