moved all configs and functions here