removed some code smell