first attempt at a usable grep