I believe to have implemented functions... also got the operator precedence the wrong...