make investigate func a little prettier