optimize sh-files