restructured to help deployment later