Removed DRY code