factor hello controller setup into its own function