make a constructor that matches the docs