updated posting function