separate tag and view functions