changed the architecture to accomodate new changes