some code clean-up