allocation model and tests