Modified for single run + made random improvements