example actually working like what was on the plunkr