corrected function call in views