add replace option to layout view