minor changes to make this work