refactored view to show edit and new both on the idex page