Eng 5573 prep -- code simplification