what is the purpose of a foundation in construction