more bash logic work