county logic added