code cleanup
added in-situ capability