complete code for test