Split the main function into a short convenience function + a more customizable function