changes to post functions and other small fixes