modularize and shit