messing with memory boundaries and a bit confused