updated test functionality