update for recent commit, muche better solution found