Feature/337 dont use deprecated

Finally I found out how to do it.  Spent a lot of time on it considering how similar it has become in the end.  At least I think that I understand it now.

@dnouri review requested