correctly subtract when you allocate space