added Foundation support