changed the way the number of calls is decided