updated with a constructor