added method to parse bates better