improve the scripte