there i couldnt merge cows pull request so i stole the code