spa implementation