added docstring and changed symbol reading to a clear input()