created model and added some logic for a blog site