pasted test routine