finish function new post type