updated code for post options