updated to fix with matts commetns