added copyPost function