level logic added, random agent logic