and finally working nicely