implement some suggestions from REW