Added functionality for getting views