Renamed displaySimulation to displaySim and made it extern
Resolved the variable name conflict