added some config and modified subrutines