initial commit + adding old code to start upgrade to foundation 5