attempting to modularize