some improvements and ws removal