modularize
constructor