removing some code smell