moved base walls into a single function