refactor using install.sh and DynamicTemplate