refactor spinallocator