implemented input and running logic in PagingSimulation