added foundation, and tweaked