Added some functions from model 1