adding in beginnings of refactor