added custom post type functions at lines 29 to 62