clearly I was not thinking when I wrote the last function