removed semicolons, added test for A being a function