added decouple functionality