abstracting steps into bash itself