implements post function.