added documentation for using functions that refer to other attributes in model definition