just nitpicking, can we rename this variable "allocated" so it is consistent across methods?