Main model function draft