added random agent plus a number of utility functions.