improve the bashscript