added func to edit posts
refactor view models