added class hierarchy for functions.