complete add function in post model