added monolithic code