rearranged bash stuff