remove redundant test.
eval expression option; refactored write functions.