test the whole process