Added before_filter to remove duplication