added SPA test codes