consolidated setup functions