incoporated suggestions from James and Bob