logic in views