brought the code over from the amiga test