some helper methods for views