changed when call spyfunction