DRY code
Simplify code