New post main function