added posts model and functionality