follow dependency injection style
modularize front-end