convert to spy precondition checks. Issue#3