modularize definition of analysis