modifieed for test