image replacement functioning as expected