ported EE476 code - broken.