Adding functionality to views