generate the base structure