Functions for each module of the model

still incomplete, need to check for consistency