add needed functions to models