This now works - needs clean up