add build system
modularize run code