Added Prepare view code