code clean-up:final