several improvements and bugs fixed