naive testing of allocate function