copy and pasted stuff that didn't work so well