added a hackey implementation of Foundation 5