modularize demo