added more tests and buggy impl for getAllVariables