Update post with better function