code in test phase