Integrating my previous changes with hassans