apply #206 for vvuksan and make a pull request

Apply hydrogenesis work from #206 and make a pretty pull request out of it

cc @hydrogenesis