few updates
method for calculating intensity added
queues replaced with deques