returns next post id