move logic to model for ads and improve scopes