break app out into separate file