add spec testing code