implement type in model