move common post saving/redirecting functionality into helper