add base model and organized code
add base model and organized code