fix bad code smell