checks to call allocation method