Thats a bad way to do this
Better to rewrite the proc from the start