futher improvments and modifications