added random method, update documentation, checked coverage