added some lewis code