refactored saving post and creating vote