working in view on variable initialization