some grep stuff and other junk