last commit had a bug. This should work now
Fixed bug