Added modular symbols function