added afterRender hook to view