moved foundation into lib