invalid pointer error, runs without problem. I changed the variable syntax and some one liners