fixed a bug in which 3(...) e.g. would be treated as *(...), and added test-cases for the reps